//1.引入express
// const cors = require('cors')
const express = require('express')
// 2. 引入路由模块
const {userRouter} = require('./routers/user.js')
const {goodsRouter} = require('./routers/goods.js')
//2.创建express实例
const app = express()
// app.use(cors()) // 跨域问题
// 集成路由
app.use(userRouter)
app.use(goodsRouter)

//4. 启动服务
app.listen(3000, console.log('启动服务成功,监听3000端口'))
